﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DatabaseManagement.DataObjects.Interfaces;

namespace DatabaseManagement.DataObjects
{
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    public class Instance : IDataObject
    {
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string Name { get; set; }
        
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public string ConnectionString { get; set; }
        
        /// <summary>
        /// Esta propiedad sirve cuando la "conexion" no esta relacionada a 
        /// ninguna instancia, así no es obligatorio usar instancias.
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public bool IsGeneric { get; set; }

        [System.Xml.Serialization.XmlElementAttribute("Databases", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
        public List<Database> ColDatabases { get; set; }


        public Instance()
        {
            ColDatabases = new List<Database>();
        }
    }
}
